﻿@model ABCTile.Models.Project

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Project</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.projectName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.projectName)
            @Html.ValidationMessageFor(model => model.projectName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.streetAddress)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.streetAddress)
            @Html.ValidationMessageFor(model => model.streetAddress)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.city)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.city)
            @Html.ValidationMessageFor(model => model.city)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.state)
        </div>
        <div class="editor-field">
        @Html.DropDownListFor(model=>model.state,new SelectList(new []{
        "Alabama",
        "Alaska",
        "Arizona",
        "Arkansas",
        "California",
        "Colorado",
        "Connecticut",
        "Delaware",
        "District of Columbia",
        "Florida",
        "Georgia", 
        "Hawaii",
        "Idaho", 
        "Illinois",
        "Indiana",
        "Iowa",
        "Kansas", 
        "Kentucky",
        "Louisiana",
        "Maine", 
        "Maryland",
        "Massachusetts",
        "Michigan",
        "Minnesota",
        "Mississippi",
        "Missouri",
        "Montana",
        "Nebraska",
        "Nevada",
        "New Hampshire",
        "New Jersey",
        "New Mexico",
        "New York",
        "North Carolina",
        "North Dakota",
        "Ohio",
        "Oklahoma",
        "Oregon",
        "Pennsylvania",
        "Rhode Island",
        "South Carolina",
        "South Dakota",
        "Tennessee",
        "Texas",
        "Utah",
        "Vermont",
        "Virginia",
        "Washington",
        "West Virginia",
        "Wisconsin",
        "Wyoming"}),"Select")
        @Html.ValidationMessageFor(model => model.state)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.zip)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.zip)
            @Html.ValidationMessageFor(model => model.zip)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.bid_date)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.bid_date, new { id = "datePicker" })
            @Html.ValidationMessageFor(model => model.bid_date)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.building_type)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.building_type)
            @Html.ValidationMessageFor(model => model.building_type)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.work_type)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.work_type)
            @Html.ValidationMessageFor(model => model.work_type)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.architectureID)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.architectureID)
            @Html.ValidationMessageFor(model => model.architectureID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ownerID)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ownerID)
            @Html.ValidationMessageFor(model => model.ownerID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.bid_submit_type)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.bid_submit_type)
            @Html.ValidationMessageFor(model => model.bid_submit_type)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.comment)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.comment)
            @Html.ValidationMessageFor(model => model.comment)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
<script type="text/javascript">

    $(document).ready(function () {
        $("#datePicker").datepicker();
        $('button, :submit').button().css('float', 'left').css('margin', '5px');
    });
</script>